<template>
    <BaseContainer>
      <aplid-base-crud ref="crud" class="w-100" v-bind="dataTotal>=4?newBaseConfig:baseConfig" @getDataTotal="getDataTotal" :paramsObj="{headId}">
      </aplid-base-crud>
    </BaseContainer>
  </template>
  
  <script setup lang="ts">
  import { ref,nextTick } from 'vue'
  import {baseConfig} from './config'
import { cloneDeep } from 'lodash-es';

  let newBaseConfig = cloneDeep(baseConfig)
  newBaseConfig.api.add = ''
  newBaseConfig.auth.add = ''

  let dataTotal = ref(0)

  const props = withDefaults(defineProps<{
    headId?:string
  }>(), {
    headId:''
  })
  const getDataTotal = (data) =>{
    dataTotal.value = data
  }
  const crud:any = ref(null)
  const handleRefresh = (query) => {
    nextTick(() => {
      crud.value.refreshChange(query)
    })
  }
  
  </script>
  <style scoped lang="scss">
  </style>